<template>
<div class="kg-head-he"></div>
<header class="kg-head reg-top">
	<div  cldivss="dqxz" @click="$router.go(-1)"><i class="micon">&#xe61e;</i></div>
	<div class="search_box show-cansu">
		我的证书
	</div>
</header>
<!---->
<div class="kg-center">
<div class="xy-wdzs-box">
	
<div class="xy-wdzs-li" v-for="(item,i) in list" :key="i" >
	<div class="xy-wdzs-liimg"><a :href="item.cert_url"><img :src="item.cert_url"/></a></div>
	<div class="xy-wdzs-litxt">
		<ul>
			<li><span>考生姓名：</span>{{item.nick_name}}</li>
			<li><span>考级专业：</span>{{item.major_second}}</li>
			<li><span>证书编号：</span>{{item.cert_code}}</li>
			<li><span>发证时间：</span>{{item.create_time}}</li>
		</ul>
		<a class="xy-wdzs-libut" :href="item.cert_url" :download="item.cert_url"><i class="micon">&#xe623;</i>下载证书</a>
	</div>
</div>
</div>
<a-empty :description="null" v-if="!list.length">暂无数据</a-empty>
</div>
</template>

<script>
import { list as certList } from '@/api/cert/index'
export default {
  name: 'Cert',
  data(){
	return{
      isLoading: false,// 正在加载
	  list:[],
	}
  },
  created () {
    // 初始化页面
    this.getList()
  },
  methods: {
	// 初始化页
    getList() {
		certList().then((result)=>{
			this.list = result.data.list;
		})
		
    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.xy-wdzs-box{background: #f3f0e9; overflow: hidden;}
</style>
